package com.design.singleton.lazy;

/**
 * @description: 锁方法
 * @author: xiemiao
 * @date: 2023/07/14  17:26
 */
public class SyncLazySingleton {

    private static SyncLazySingleton SYNC_LAZY_SINGLETON = null;

    private SyncLazySingleton() {
    }

    synchronized public static SyncLazySingleton getInstance() {
        if (SYNC_LAZY_SINGLETON == null) {
            SYNC_LAZY_SINGLETON = new SyncLazySingleton();
        }
        return SYNC_LAZY_SINGLETON;
    }
}
